package com.zh.ssmshirofreemarker.entity;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author ZH
 * @since 2018-07-26
 * @since 2018-07-24

 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Permission extends Model<Permission> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "permission_id", type = IdType.AUTO)
    private Long permissionId;
    /**
     * 权限名称
     */
    private String permissionName;
    /**
     * 权限字符
     */
    private String permission;
    /**
     * url地址
     */
    private String url;
    /**
     * 权限类型，菜单或者按钮,0,菜单  ; 1,按钮
     */
    private Integer type;
    /**
     * 上级ID，
     */
    private Long parentId;
    /**
     *  id链  ；  例： 0，1，2
     */
    private String idChain;
    /**
     * 图标
     */
    private String icon;
    /**
     * 0,未删除； 1,已删除
     */
    private Integer deleteFlag;
    /**
     * 排序
     */
    private Integer sortNum;
    /**
     * 描述
     */
    private String desc;


    public Long getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(Long permissionId) {
        this.permissionId = permissionId;
    }

    public String getPermissionName() {
        return permissionName;
    }

    public void setPermissionName(String permissionName) {
        this.permissionName = permissionName;
    }

    public String getPermission() {
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getIdChain() {
        return idChain;
    }

    public void setIdChain(String idChain) {
        this.idChain = idChain;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Integer getSortNum() {
        return sortNum;
    }

    public void setSortNum(Integer sortNum) {
        this.sortNum = sortNum;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    protected Serializable pkVal() {
        return this.permissionId;
    }

    @Override
    public String toString() {
        return "Permission{" +
        ", permissionId=" + permissionId +
        ", permissionName=" + permissionName +
        ", permission=" + permission +
        ", url=" + url +
        ", type=" + type +
        ", parentId=" + parentId +
        ", idChain=" + idChain +
        ", icon=" + icon +
        ", deleteFlag=" + deleteFlag +
        ", sortNum=" + sortNum +
        ", desc=" + desc +
        "}";
    }
}
